package com.card323.crpg.io;

import com.card323.crpg.io.console.ConsoleMessageReceiver;
import com.card323.crpg.io.msn.MSNReceiverManager;


public class MessageReceiverFactory {
	private MessageReceiverFactory() {

	}

	private static class SingletonHolder {
		public static final MessageReceiverFactory instance = new MessageReceiverFactory();
	}

	public static MessageReceiverFactory getInstance() {
		return SingletonHolder.instance;
	}
	
	
	
	public MessageReceiver get_message_receiver(String type,String email)
	{
		if(type.equals("msn"))
		{
			return MSNReceiverManager.getInstance().get_message_receiver(email);
		}
		if(type.equals("console"))
		{
			return new ConsoleMessageReceiver();
		}
		return null;
	}
}
